<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <title>Add a table type</title>
    </h:head>
    <h:body>
        <h:form prependId="false">
            <p:messages id="msgs" showDetail="true"/>
        </h:form>
        
        <h:form>
            <p:menubar autoSubmenuDisplay="true">
                <p:submenu label="Login">
                    <p:menuitem value="Login" url="StakeholderLogin.xhtml" />
                </p:submenu>

                <p:submenu label="Branch Management">
                    <p:menuitem value="Add Branch" url="StakeholderAddBranch.xhtml" />
                    <p:menuitem value="View All" url="StakeholderViewAllBranch.xhtml" />
                    <p:menuitem value="Edit Info" url="TCubeEditBranchInfo.xhtml" />

                </p:submenu>
                
                <p:submenu label="Back office IOTR Management">
                    <p:menuitem value="Manage table layout" url="StakeholderManageTableLayout.xhtml" />
                </p:submenu>
                
            </p:menubar>
                 
            <p:growl id="msgs" />
            <p:panel id="panel" header="Add a table type">
                <p:ajaxStatus style="width:16px;height:16px;">
                    <f:facet name="start">
                        <h:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" />
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value="" />
                    </f:facet>
                </p:ajaxStatus>
                <p:messages />
                <h:panelGrid columns="3" columnClasses="column" cellpadding="5">
                    
                    <h:outputText value="Table type name: " />
                    <p:inputText required="true" requiredMessage="Table type name is required." id="tabletypename" value="#{stakeholderManagerBean.name}">
                    </p:inputText>
                    <p:message for="tabletypename" />
                    

                    <h:outputText value="Unit capacity: " />
                    <p:inputText required="true" requiredMessage="Unit capacity is required." id="unitcapacity" value="#{stakeholderManagerBean.unitCapacity}">
                    </p:inputText>
                    <p:message for="unitcapacity" />
                    
                    <h:outputText value="Description: " />
                    <p:inputTextarea required="true" requiredMessage="Description should be provided" style="width:300px;height:100px;" effectDuration="400" id="description" value="#{stakeholderManagerBean.description}" />
                    <p:message for="description" />
                    
                    <h:outputText value="Image URL: " />
                    <p:inputText id="imageURL" value="#{stakeholderManagerBean.imageURL}" />           
                    <p:message for="imageURL" />                
                </h:panelGrid>

                <p:commandButton id="submitbutton" value="Submit" update="panel" actionListener="#{stakeholderManagerBean.addTableType}" ajax="true" />
            </p:panel>

        </h:form>


    </h:body>
</html>

